import axios from "./axios";
//获取首页轮播
export function getBannerTop() {
  return axios({
    url: "/banner",
  });
}
//获取热门推荐数据
export function getPersonalized() {
  return axios({
    url: "/personalized",
  });
}
// 获取新品上架轮播
export function getAlbumBanners(limit, offset) {
  return axios({
    url: "/top/album",
    parmas: {
      limit,
      offset,
    },
  });
}
// 获取最新的专辑
export function getAlbumNewest() {
  return axios({
    url: "/album/newest",
  });
}
// 获取排行榜
export function getToplist() {
  return axios({
    url: "/toplist",
  });
}
//根据榜单ID获取相应榜单详情
export function getPlaylistId(id) {
  return axios({
    url: "/playlist/detail",
    params: {
      id,
    },
  });
}
// 获取歌手
export function getSinger() {
  return axios({
    url: "/top/artists",
  });
}
// 获取电台
export function getHotDjprogram() {
  return axios({
    url: "/personalized/djprogram",
  });
}

export function getComment(id, limit, offset, before) {
  return axios({
    url: "/comment/playlist",
    params: {
      id,
      limit,
      offset,
      before,
    },
  });
}
